package com.night.controller;

import com.night.entity.Order;
import com.night.service.OrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: chen yang
 * @Date: 2025/3/23 21:58
 */
@RestController("/order")
public class OrderController {

    private final OrderService orderService;

    public OrderController(OrderService orderService) {
        this.orderService = orderService;
    }


    @GetMapping("/byId/{id}")
    public Order getById(@PathVariable Long id) {
        return orderService.getById(id);
    }
}
